//
//  Putere.cpp
//  Lab12-calcul functie
//
//  Created by Cristi Holdunu on 6/1/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#include <iostream>
#include <math.h>
#include "Putere.h"

long double Putere::calcul()
{
    if (!fStang || !fDrept)
        return 1;
    return pow(fDrept->calcul(),fStang->calcul());
}
std::string Putere::derivare()
{

    std::string aux, aux1, aux2;
    aux1=fStang->convertString();
    aux2=fDrept->convertString();
    aux=aux1 +"*"+aux2;
    return aux;
}
std::string Putere::convertString()
{
    return (fStang->convertString()+"^"+fDrept->convertString());
}
long double Putere::calculDerivata()
{
    
}

std::string Putere::concatTermeni(std::string)
{
    
}
long double Putere::calcul(long double)
{
    return 1;
}